package com.threeox.ormlibrary.entity;

/**
 *
 * @ClassName: ColumnType
 *
 * @Description: TODO(列的类型)
 *
 * @author 赵屈犇
 *
 * @date 创建时间: 2017/6/29 10:13
 *
 * @version 1.0
 *
 */
public class ColumnType {

    //值是一个 NULL 值
    public static final String NULL = "NULL";
    /**
     * INTEGER 类型开始
     */
    // 值是一个带符号的整数，根据值的大小存储在 1、2、3、4、6 或 8 字节中
    public static final String INTEGER = "INTEGER";

    public static final String INT = "INT";

    public static final String TINYINT = "TINYINT";

    public static final String SMALLINT = "SMALLINT";

    public static final String MEDIUMINT = "MEDIUMINT";

    public static final String BIGINT = "BIGINT";

    public static final String UNSIGNED_BIG_INT = "UNSIGNED BIG INT";

    public static final String INT2 = "INT2";

    public static final String INT8 = "INT8";
    /**
     * INTEGER 类型结束
     */

    /**
     * 文本字符串开始
     */
    // 值是一个文本字符串，使用数据库编码（UTF-8、UTF-16BE 或 UTF-16LE）存储
    public static final String TEXT = "TEXT";

    public static final String CHARACTER = "CHARACTER";

    public static final String VARCHAR = "VARCHAR";

    public static final String VARYING_CHARACTER = "VARYING CHARACTER";

    public static final String NCHAR = "NCHAR";

    public static final String NATIVE_CHARACTER = "NATIVE CHARACTER";

    public static final String NVARCHAR = "NVARCHAR";

    public static final String CLOB = "CLOB";
    /**
     * 文本字符串结束
     */

    /**
     * NONE 类型开始
     */
    // 不做任何的转换，直接以该数据所属的数据类型进行存储
    public static final String NONE = "NONE";

    public static final String BLOB = "BLOB";

    public static final String NO_DATATYPE_SPECIFIED = "NO DATATYPE SPECIFIED";
    /**
     * NONE 类型结束
     */

    /**
     * REAL 类型开始
     */
    // 值是一个浮点值，存储为 8 字节的 IEEE 浮点数字
    public static final String REAL = "REAL";

    public static final String DOUBLE = "DOUBLE";

    public static final String DOUBLE_PRECISION = "DOUBLE PRECISION";

    public static final String FLOAT = "FLOAT";
    /**
     * REAL 类型结束
     */

    /**
     * NUMERIC 类型开始
     */
    /**
     * 当文本数据被插入到亲缘性为NUMERIC的字段中时，如果转换操作不会导致数据信息丢失以及完全可逆，那么SQLite就会将该文本数据转换为INTEGER或REAL类型的数据，如果转换失败，SQLite仍会以TEXT方式存储该数据。对于NULL或BLOB类型的新数据，SQLite将不做任何转换，直接以NULL或BLOB的方式存储该数据。需要额外说明的是，对于浮点格式的常量文本，如"30000.0"，如果该值可以转换为INTEGER同时又不会丢失数值信息，那么SQLite就会将其转换为INTEGER的存储方式
     */
    public static final String NUMERIC = "NUMERIC";

    public static final String DECIMAL = "DECIMAL";
    // Boolean 数据类型
    public static final String BOOLEAN = "BOOLEAN";

    public static final String DATE = "DATE";

    public static final String DATETIME = "DATETIME";

    public static final String TIMESTAMP = "TIMESTAMP";
    /**
     * NUMERIC 类型结束
     */
}
